package gof.com.yew.factory.factoryMethod;

import gof.com.yew.factory.simpleFactory.Car;
/**
 * 工厂方法：用来生产同一等级结构中的固定产品
 * @author yw
 */
public class FactoryDemo02 {
	public static void main(String[] args) {
		Car car = new AudiCarFactory().createCar();
		car.run();
		car = new BydCarFactory().createCar();
		car.run();
		car = new BenzCarFactory().createCar();
		car.run();
	}

}
